package cn.wolfcode.luowowo.comment.service;

import cn.wolfcode.luowowo.comment.domain.SceneryComment;
import cn.wolfcode.luowowo.comment.domain.SceneryReply;
import cn.wolfcode.luowowo.comment.query.SceneryCommentQuery;
import cn.wolfcode.luowowo.comment.query.SceneryReplyQuery;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 风景评论服务
 */
public interface ISceneryCommentService {

    SceneryComment save(SceneryComment comment);

    /**
     * 分页
     *
     */
    List<SceneryComment> list();

    /**
     * 查单个
     * @param id
     * @return
     */
    SceneryComment get(String id);

    Page<SceneryComment> query(SceneryCommentQuery qo);

    Page<SceneryComment> findCommentBySceneryId(SceneryCommentQuery qo);

    /**
     * 根据用户id查询点评
     * @param uid
     * @return
     */
    List<SceneryComment> queryByUserId(Long uid);
    List<SceneryReply> listForReply(String commentId);

    /**
     * 点赞功能
     * @param commentid 评论id
     * @param fromid 点赞者id
     * @return
     */
    boolean thumbUp(String commentid, Long fromid);

    /**
     * 获取单个评论
     * @param commentId
     * @return
     */
    SceneryComment getComment(String commentId);
}
